package tds.model26;

import java.util.HashMap;
import java.util.Map;

/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName President
 * @Description 总经理（中介者的实现类）
 * @author tds
 * @Date 2020/2/7 21:37
 * @version 1.0.0
 */
public class President implements Mediator{

    private Map<String, Department> departmentMap = new HashMap<>();

    @Override
    public void register(String dname, Department department) {
        departmentMap.put(dname, department);
    }

    @Override
    public void command(String dname) {
        departmentMap.get(dname).outAction();
    }
}
